﻿namespace SLClient.CustomerControls
{
    using SLClient.Infrastructure;
    using SLClient.ServiceAPI;
    using System;
    using System.Linq.Expressions;
    using System.Reflection;

    public class NewItemViewModel : ViewModelBase
    {
        private int? _announType;
        private string _content;

        public NewItemViewModel(Announment announment)
        {
            this._announType = announment.AnnounType;
            this._content = announment.AnnounTitle + ":" + announment.AnnounContent;
        }

        public int? AnnounType
        {
            get
            {
                return this._announType;
            }
            set
            {
                this._announType = value;
                base.Notify<int?>(() => this.AnnounType);
                //base.Notify<int?>(System.Linq.Expressions.Expression.Lambda<Func<int?>>(System.Linq.Expressions.Expression.Property(System.Linq.Expressions.Expression.Constant(this, typeof(NewItemViewModel)), (MethodInfo)(NewItemViewModel.get_AnnounType)), new ParameterExpression[0]));
            }
        }

        public string Content
        {
            get
            {
                return this._content;
            }
        }
    }
}

